list: render as a single chronological timeline (Phase B) - #30
Merged
Conversation
Resolve two ambiguities in the Phase B mockup before implementing: memo lines keep their hash/tags (del/tag need it, so omitting it would just force a separate list lookup), and the "Today's logs are..." header stays for consistency with every other list mode.
list's default view moves from Task/Memo sections to one
chronological list (log.Timeline merges and sorts both, replacing
the split-then-render path for this case). Each line now leads with
its creation time and a marker ("・" for a memo, "[ ]"/"[x]"/"[>]"
for a task), with the hash and tags trailing in parens — memos keep
their hash since del/tag still need it. view.ItemList is removed;
Timeline is its only remaining caller. -t tag filtering and all other
list modes (-a, -s, a specific date) are unaffected.
- Split/Timeline: sort.Slice -> sort.SliceStable so items sharing the same millisecond CreatedAt keep a deterministic order instead of an unspecified one. - openTaskHashes: match the "[ ]" marker only at its fixed position and read the hash from the last parenthesized group, so item content containing "[ ]" or literal parentheses no longer produces a false match. Found in Phase B code review; findings 4-6 from the same review are documented in docs/reports/2026-08-08-phase-b-code-review.md and left open for Phase C.
Add model.Item.Status(), giving Closed precedence over Started, so the memo/open/started/closed precedence lives with the data instead of being re-derived inline in view.Timeline. view.Timeline now maps Status() to a marker with a flat switch instead of an if-guarded one. Addresses findings 5-6 from the Phase B code review (already documented as deferred in docs/reports/2026-08-08-phase-b-code-review.md, now updated to reflect the fix).
- openTaskHashes: rename open/close locals so they don't shadow the close builtin. - model.go: add a doc comment on the Status const block so exported constants aren't flagged as undocumented.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
list's default view moves from separate Task/Memo sections to one chronological timeline:log.Timelinemerges and sorts every item, each line leads with its creation time and a marker (・for a memo,[ ]/[x]/[>]for a task), with hash and tags trailing in parens.Split/Timelinenow sort withsort.SliceStable(deterministic tie-break for same-millisecond items), and the test helperopenTaskHashesno longer mismatches on task content containing"[ ]"or literal parentheses.model.Item.Status()soview.Timelinemaps status to marker with a flat switch instead of re-deriving it inline.Test plan
gofmt -l .cleango vet ./...cleango build ./...go test ./... -count=1(all 7 packages pass)